/*
 ******************************************************************
 *      
 * 域名空间　	: GreatB2C.Model
 * 类　名　称	: Admin.cs
 * 类　功　能	: 返回数据集是基于Model对象
 * 类　流　程    :                             
 * 运用算法　	:                             
 * 编　写　人	: wangchao             
 * 编写日期　	: 2011/3/28
 * 最近更新日期　:	    
 * 版　　本　	: V1.0                           
 * 描　　述　	: Descript of Class                                                 
 *                                        
 ******************************************************************
*/

using System;
using System.Text;

namespace GreatB2C.Model
{
    /// <summary>
    /// Descript of this class
    /// </summary>
    [Serializable]
    public class Admin
    {
        // 主键
        protected int _AdminID = 0;

        //其它字段
        protected string _AdminName = String.Empty;
        protected string _AdminPassword = String.Empty;
        protected string _UserName = String.Empty;
        protected bool _EnableMultiLogin = false;
        protected string _RndPassword = String.Empty;
        protected int _LoginTimes = 0;
        protected string _LastLoginIP = String.Empty;
        protected DateTime _LastLoginTime;
        protected DateTime _LastLogoutTime;
        protected DateTime _LastModifyPasswordTime;
        protected bool _IsLock = false;
        protected bool _EnableModifyPassword = false;
        protected string _Hash = String.Empty;
        protected int _LoginErrorTimes = 0;


        #region Public Properties
        /// <summary>
        /// 管理员ID
        /// </summary>
        public int AdminID
        {
            get { return _AdminID; }
            set { _AdminID = value; }
        }


        /// <summary>
        /// 管理员名称
        /// </summary>
        public string AdminName
        {
            get { return _AdminName; }
            set { _AdminName = value; }
        }

        /// <summary>
        /// 管理员密码
        /// </summary>
        public string AdminPassword
        {
            get { return _AdminPassword; }
            set { _AdminPassword = value; }
        }

        /// <summary>
        /// 前台用户名称
        /// </summary>
        public string UserName
        {
            get { return _UserName; }
            set { _UserName = value; }
        }

        /// <summary>
        /// 是否允许多人登录
        /// </summary>
        public bool EnableMultiLogin
        {
            get { return _EnableMultiLogin; }
            set { _EnableMultiLogin = value; }
        }

        /// <summary>
        /// 随机密码
        /// </summary>
        public string RndPassword
        {
            get { return _RndPassword; }
            set { _RndPassword = value; }
        }

        /// <summary>
        /// 登录次数
        /// </summary>
        public int LoginTimes
        {
            get { return _LoginTimes; }
            set { _LoginTimes = value; }
        }

        /// <summary>
        /// 最近登录IP
        /// </summary>
        public string LastLoginIP
        {
            get { return _LastLoginIP; }
            set { _LastLoginIP = value; }
        }

        /// <summary>
        /// 最近登录时间
        /// </summary>
        public DateTime LastLoginTime
        {
            get { return _LastLoginTime; }
            set { _LastLoginTime = value; }
        }

        /// <summary>
        /// 最近退出管理后台时间
        /// </summary>
        public DateTime LastLogoutTime
        {
            get { return _LastLogoutTime; }
            set { _LastLogoutTime = value; }
        }

        /// <summary>
        /// 最近修改密码时间
        /// </summary>
        public DateTime LastModifyPasswordTime
        {
            get { return _LastModifyPasswordTime; }
            set { _LastModifyPasswordTime = value; }
        }

        /// <summary>
        /// 是否锁定
        /// </summary>
        public bool IsLock
        {
            get { return _IsLock; }
            set { _IsLock = value; }
        }

        /// <summary>
        /// 是否允许修改密码
        /// </summary>
        public bool EnableModifyPassword
        {
            get { return _EnableModifyPassword; }
            set { _EnableModifyPassword = value; }
        }

        /// <summary>
        /// 有效性验证
        /// </summary>
        public string Hash
        {
            get { return _Hash; }
            set { _Hash = value; }
        }

        /// <summary>
        /// 登录错误次数
        /// </summary>
        public int LoginErrorTimes
        {
            get { return _LoginErrorTimes; }
            set { _LoginErrorTimes = value; }
        }
        #endregion
    }
}
